﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.CampaignSystem.CampaignMission
// Assembly: TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E85F8C15-4DF6-4E9C-A58A-29177E40D07A
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.dll

using System;
using System.Collections.Generic;
using TaleWorlds.CampaignSystem.Conversation;
using TaleWorlds.CampaignSystem.Roster;
using TaleWorlds.CampaignSystem.Settlements.Locations;
using TaleWorlds.Core;

#nullable disable
namespace TaleWorlds.CampaignSystem
{
  public static class CampaignMission
  {
    public static ICampaignMission Current { get; set; }

    public static IMission OpenBattleMission(string scene, bool usesTownDecalAtlas)
    {
      return Campaign.Current.CampaignMissionManager.OpenBattleMission(scene, usesTownDecalAtlas);
    }

    public static IMission OpenAlleyFightMission(
      string scene,
      int upgradeLevel,
      Location location,
      TroopRoster playerSideTroops,
      TroopRoster rivalSideTroops)
    {
      return Campaign.Current.CampaignMissionManager.OpenAlleyFightMission(scene, upgradeLevel, location, playerSideTroops, rivalSideTroops);
    }

    public static IMission OpenCombatMissionWithDialogue(
      string scene,
      CharacterObject characterToTalkTo,
      int upgradeLevel)
    {
      return Campaign.Current.CampaignMissionManager.OpenCombatMissionWithDialogue(scene, characterToTalkTo, upgradeLevel);
    }

    public static IMission OpenBattleMissionWhileEnteringSettlement(
      string scene,
      int upgradeLevel,
      int numberOfMaxTroopToBeSpawnedForPlayer,
      int numberOfMaxTroopToBeSpawnedForOpponent)
    {
      return Campaign.Current.CampaignMissionManager.OpenBattleMissionWhileEnteringSettlement(scene, upgradeLevel, numberOfMaxTroopToBeSpawnedForPlayer, numberOfMaxTroopToBeSpawnedForOpponent);
    }

    public static IMission OpenHideoutBattleMission(string scene, FlattenedTroopRoster playerTroops)
    {
      return Campaign.Current.CampaignMissionManager.OpenHideoutBattleMission(scene, playerTroops);
    }

    public static IMission OpenSiegeMissionWithDeployment(
      string scene,
      float[] wallHitPointsPercentages,
      bool hasAnySiegeTower,
      List<MissionSiegeWeapon> siegeWeaponsOfAttackers,
      List<MissionSiegeWeapon> siegeWeaponsOfDefenders,
      bool isPlayerAttacker,
      int upgradeLevel = 0,
      bool isSallyOut = false,
      bool isReliefForceAttack = false)
    {
      return Campaign.Current.CampaignMissionManager.OpenSiegeMissionWithDeployment(scene, wallHitPointsPercentages, hasAnySiegeTower, siegeWeaponsOfAttackers, siegeWeaponsOfDefenders, isPlayerAttacker, upgradeLevel, isSallyOut, isReliefForceAttack);
    }

    public static IMission OpenSiegeMissionNoDeployment(
      string scene,
      bool isSallyOut = false,
      bool isReliefForceAttack = false)
    {
      return Campaign.Current.CampaignMissionManager.OpenSiegeMissionNoDeployment(scene, isSallyOut, isReliefForceAttack);
    }

    public static IMission OpenSiegeLordsHallFightMission(
      string scene,
      FlattenedTroopRoster attackerPriorityList)
    {
      return Campaign.Current.CampaignMissionManager.OpenSiegeLordsHallFightMission(scene, attackerPriorityList);
    }

    public static IMission OpenBattleMission(MissionInitializerRecord rec)
    {
      return Campaign.Current.CampaignMissionManager.OpenBattleMission(rec);
    }

    public static IMission OpenCaravanBattleMission(MissionInitializerRecord rec, bool isCaravan)
    {
      return Campaign.Current.CampaignMissionManager.OpenCaravanBattleMission(rec, isCaravan);
    }

    public static IMission OpenTownCenterMission(
      string scene,
      Location location,
      CharacterObject talkToChar,
      int townUpgradeLevel,
      string playerSpawnTag)
    {
      return Campaign.Current.CampaignMissionManager.OpenTownCenterMission(scene, townUpgradeLevel, location, talkToChar, playerSpawnTag);
    }

    public static IMission OpenCastleCourtyardMission(
      string scene,
      Location location,
      CharacterObject talkToChar,
      int castleUpgradeLevel)
    {
      return Campaign.Current.CampaignMissionManager.OpenCastleCourtyardMission(scene, castleUpgradeLevel, location, talkToChar);
    }

    public static IMission OpenVillageMission(
      string scene,
      Location location,
      CharacterObject talkToChar)
    {
      return Campaign.Current.CampaignMissionManager.OpenVillageMission(scene, location, talkToChar);
    }

    public static IMission OpenIndoorMission(
      string scene,
      int upgradeLevel,
      Location location,
      CharacterObject talkToChar)
    {
      return Campaign.Current.CampaignMissionManager.OpenIndoorMission(scene, upgradeLevel, location, talkToChar);
    }

    public static IMission OpenPrisonBreakMission(
      string scene,
      Location location,
      CharacterObject prisonerCharacter,
      CharacterObject companionCharacter = null)
    {
      return Campaign.Current.CampaignMissionManager.OpenPrisonBreakMission(scene, location, prisonerCharacter, companionCharacter);
    }

    public static IMission OpenArenaStartMission(
      string scene,
      Location location,
      CharacterObject talkToChar)
    {
      return Campaign.Current.CampaignMissionManager.OpenArenaStartMission(scene, location, talkToChar);
    }

    public static IMission OpenArenaDuelMission(
      string scene,
      Location location,
      CharacterObject talkToChar,
      bool requireCivilianEquipment,
      bool spawnBothSidesWithHorse,
      Action<CharacterObject> onDuelEnd,
      float customAgentHealth)
    {
      return Campaign.Current.CampaignMissionManager.OpenArenaDuelMission(scene, location, talkToChar, requireCivilianEquipment, spawnBothSidesWithHorse, onDuelEnd, customAgentHealth);
    }

    public static IMission OpenConversationMission(
      ConversationCharacterData playerCharacterData,
      ConversationCharacterData conversationPartnerData,
      string specialScene = "",
      string sceneLevels = "")
    {
      return Campaign.Current.CampaignMissionManager.OpenConversationMission(playerCharacterData, conversationPartnerData, specialScene, sceneLevels);
    }

    public static IMission OpenRetirementMission(
      string scene,
      Location location,
      CharacterObject talkToChar = null,
      string sceneLevels = null)
    {
      return Campaign.Current.CampaignMissionManager.OpenRetirementMission(scene, location, talkToChar, sceneLevels);
    }

    public interface ICampaignMissionManager
    {
      IMission OpenSiegeMissionWithDeployment(
        string scene,
        float[] wallHitPointsPercentages,
        bool hasAnySiegeTower,
        List<MissionSiegeWeapon> siegeWeaponsOfAttackers,
        List<MissionSiegeWeapon> siegeWeaponsOfDefenders,
        bool isPlayerAttacker,
        int upgradeLevel = 0,
        bool isSallyOut = false,
        bool isReliefForceAttack = false);

      IMission OpenSiegeMissionNoDeployment(
        string scene,
        bool isSallyOut = false,
        bool isReliefForceAttack = false);

      IMission OpenSiegeLordsHallFightMission(
        string scene,
        FlattenedTroopRoster attackerPriorityList);

      IMission OpenBattleMission(MissionInitializerRecord rec);

      IMission OpenCaravanBattleMission(MissionInitializerRecord rec, bool isCaravan);

      IMission OpenBattleMission(string scene, bool usesTownDecalAtlas);

      IMission OpenHideoutBattleMission(string scene, FlattenedTroopRoster playerTroops);

      IMission OpenTownCenterMission(
        string scene,
        int townUpgradeLevel,
        Location location,
        CharacterObject talkToChar,
        string playerSpawnTag);

      IMission OpenCastleCourtyardMission(
        string scene,
        int castleUpgradeLevel,
        Location location,
        CharacterObject talkToChar);

      IMission OpenVillageMission(string scene, Location location, CharacterObject talkToChar);

      IMission OpenIndoorMission(
        string scene,
        int upgradeLevel,
        Location location,
        CharacterObject talkToChar);

      IMission OpenPrisonBreakMission(
        string scene,
        Location location,
        CharacterObject prisonerCharacter,
        CharacterObject companionCharacter = null);

      IMission OpenArenaStartMission(string scene, Location location, CharacterObject talkToChar);

      IMission OpenArenaDuelMission(
        string scene,
        Location location,
        CharacterObject duelCharacter,
        bool requireCivilianEquipment,
        bool spawnBOthSidesWithHorse,
        Action<CharacterObject> onDuelEndAction,
        float customAgentHealth);

      IMission OpenConversationMission(
        ConversationCharacterData playerCharacterData,
        ConversationCharacterData conversationPartnerData,
        string specialScene = "",
        string sceneLevels = "");

      IMission OpenMeetingMission(string scene, CharacterObject character);

      IMission OpenAlleyFightMission(
        string scene,
        int upgradeLevel,
        Location location,
        TroopRoster playerSideTroops,
        TroopRoster rivalSideTroops);

      IMission OpenCombatMissionWithDialogue(
        string scene,
        CharacterObject characterToTalkTo,
        int upgradeLevel);

      IMission OpenBattleMissionWhileEnteringSettlement(
        string scene,
        int upgradeLevel,
        int numberOfMaxTroopToBeSpawnedForPlayer,
        int numberOfMaxTroopToBeSpawnedForOpponent);

      IMission OpenRetirementMission(
        string scene,
        Location location,
        CharacterObject talkToChar = null,
        string sceneLevels = null);
    }
  }
}
